| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1 | Gerrit Code Review - '/projects/' REST API |
| 2 | ========================================== |
| 3 | |
| 4 | This page describes the project related REST endpoints. |
| 5 | Please also take note of the general information on the |
| 6 | link:rest-api.html[REST API]. |
| 7 | |
| 8 | Endpoints |
| 9 | --------- |
| 10 | |
| Edwin Kempin | c3fe3cb | 2013-02-13 15:09:23 +0100 | [diff] [blame] | 11 | [[project-endpoints]] |
| 12 | Project Endpoints |
| 13 | ----------------- |
| 14 | |
| Edwin Kempin | 7620274 | 2013-02-15 13:51:50 +0100 | [diff] [blame] | 15 | [[list-projects]] |
| Edwin Kempin | 82d3037 | 2013-02-04 08:49:34 +0100 | [diff] [blame] | 16 | GET /projects/ (List Projects) |
| 17 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 18 | Lists the projects accessible by the caller. This is the same as |
| 19 | using the link:cmd-ls-projects.html[ls-projects] command over SSH, |
| 20 | and accepts the same options as query parameters. |
| 21 | |
| Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 22 | As result a map is returned that maps the project names to |
| 23 | link:#project-info[ProjectInfo] entries. The entries in the map are sorted |
| 24 | by project name. |
| 25 | |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 26 | .Request |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 27 | ---- |
| 28 | GET /projects/?d HTTP/1.0 |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 29 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 30 | |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 31 | .Response |
| 32 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 33 | HTTP/1.1 200 OK |
| 34 | Content-Disposition: attachment |
| 35 | Content-Type: application/json;charset=UTF-8 |
| 36 | |
| 37 | )]}' |
| 38 | { |
| 39 | "external/bison": { |
| 40 | "kind": "gerritcodereview#project", |
| 41 | "id": "external%2Fbison", |
| 42 | "description": "GNU parser generator" |
| 43 | }, |
| 44 | "external/gcc": { |
| 45 | "kind": "gerritcodereview#project", |
| 46 | "id": "external%2Fgcc", |
| 47 | }, |
| 48 | "external/openssl": { |
| 49 | "kind": "gerritcodereview#project", |
| 50 | "id": "external%2Fopenssl", |
| 51 | "description": "encryption\ncrypto routines" |
| 52 | }, |
| 53 | "test": { |
| 54 | "kind": "gerritcodereview#project", |
| 55 | "id": "test", |
| 56 | "description": "\u003chtml\u003e is escaped" |
| 57 | } |
| 58 | } |
| 59 | ---- |
| 60 | |
| Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 61 | .Get all projects with their description |
| 62 | **** |
| 63 | get::/projects/?d |
| 64 | **** |
| 65 | |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 66 | [[suggest-projects]] |
| 67 | The `/projects/` URL also accepts a prefix string in the `p` parameter. |
| 68 | This limits the results to those projects that start with the specified |
| 69 | prefix. |
| 70 | List all projects that start with `platform/`: |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 71 | |
| 72 | .Request |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 73 | ---- |
| 74 | GET /projects/?p=platform%2F HTTP/1.0 |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 75 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 76 | |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 77 | .Response |
| 78 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 79 | HTTP/1.1 200 OK |
| 80 | Content-Disposition: attachment |
| 81 | Content-Type: application/json;charset=UTF-8 |
| 82 | |
| 83 | )]}' |
| 84 | { |
| 85 | "platform/drivers": { |
| 86 | "kind": "gerritcodereview#project", |
| 87 | "id": "platform%2Fdrivers", |
| 88 | }, |
| 89 | "platform/tools": { |
| 90 | "kind": "gerritcodereview#project", |
| 91 | "id": "platform%2Ftools", |
| 92 | } |
| 93 | } |
| 94 | ---- |
| 95 | E.g. this feature can be used by suggestion client UI's to limit results. |
| 96 | |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 97 | [[get-project-description]] |
| 98 | GET /projects/\{project-name\}/description (Get Project Description) |
| 99 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 100 | Retrieves the description of a project. |
| 101 | |
| 102 | .Request |
| 103 | ---- |
| 104 | GET /projects/plugins%2Freplication/description HTTP/1.0 |
| 105 | ---- |
| 106 | |
| 107 | .Response |
| 108 | ---- |
| 109 | HTTP/1.1 200 OK |
| 110 | Content-Disposition: attachment |
| 111 | Content-Type: application/json;charset=UTF-8 |
| 112 | |
| 113 | )]}' |
| 114 | "Copies to other servers using the Git protocol" |
| 115 | ---- |
| 116 | |
| 117 | [[set-project-description]] |
| 118 | PUT /projects/\{project-name\}/description (Set Project Description) |
| 119 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 120 | Sets the description of a project. |
| 121 | |
| 122 | The new project description must be provided in the request body inside |
| 123 | a link:#project-description-input[ProjectDescriptionInput] entity. |
| 124 | |
| 125 | .Request |
| 126 | ---- |
| 127 | PUT /projects/plugins%2Freplication/description HTTP/1.0 |
| 128 | Content-Type: application/json;charset=UTF-8 |
| 129 | |
| 130 | { |
| 131 | "description": "Plugin for Gerrit that handles the replication.", |
| 132 | "commit_message": "Update the project description" |
| 133 | } |
| 134 | ---- |
| 135 | |
| 136 | As response the new project description is returned. |
| 137 | |
| 138 | .Response |
| 139 | ---- |
| 140 | HTTP/1.1 200 OK |
| 141 | Content-Disposition: attachment |
| 142 | Content-Type: application/json;charset=UTF-8 |
| 143 | |
| 144 | )]}' |
| 145 | "Plugin for Gerrit that handles the replication." |
| 146 | ---- |
| 147 | |
| 148 | [[delete-project-description]] |
| 149 | DELETE /projects/\{project-name\}/description (Delete Project Description) |
| 150 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 151 | Deletes the description of a project. |
| 152 | |
| 153 | A message to commit the change of the project description can be |
| 154 | specified in the request body inside a |
| 155 | link:#project-description-input[ProjectDescriptionInput] entity. |
| 156 | |
| 157 | Please note, that some proxies prohibit request bodies for DELETE |
| 158 | requests. In this case, if you want to specify a commit message, use |
| 159 | link:#set-project-description[PUT] to delete the description. |
| 160 | |
| 161 | .Request |
| 162 | ---- |
| 163 | DELETE /projects/plugins%2Freplication/description HTTP/1.0 |
| 164 | ---- |
| 165 | |
| 166 | .Response |
| 167 | ---- |
| 168 | HTTP/1.1 204 No Content |
| 169 | ---- |
| 170 | |
| Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 171 | [[get-project-parent]] |
| 172 | GET /projects/\{project-name\}/parent (Get Project Parent) |
| 173 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 174 | Retrieves the name of a project's parent project. For the |
| 175 | `All-Projects` root project an empty string is returned. |
| 176 | |
| 177 | .Request |
| 178 | ---- |
| 179 | GET /projects/plugins%2Freplication/parent HTTP/1.0 |
| 180 | ---- |
| 181 | |
| 182 | .Response |
| 183 | ---- |
| 184 | HTTP/1.1 200 OK |
| 185 | Content-Disposition: attachment |
| 186 | Content-Type: application/json;charset=UTF-8 |
| 187 | |
| 188 | )]}' |
| 189 | "All-Projects" |
| 190 | ---- |
| 191 | |
| 192 | [[set-project-parent]] |
| 193 | PUT /projects/\{project-name\}/parent (Set Project Parent) |
| 194 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 195 | Sets the parent project for a project. |
| 196 | |
| 197 | The new name of the parent project must be provided in the request body |
| 198 | inside a link:#project-parent-input[ProjectParentInput] entity. |
| 199 | |
| 200 | .Request |
| 201 | ---- |
| 202 | PUT /projects/plugins%2Freplication/parent HTTP/1.0 |
| 203 | Content-Type: application/json;charset=UTF-8 |
| 204 | |
| 205 | { |
| 206 | "parent": "Public-Plugins", |
| 207 | "commit_message": "Update the project parent" |
| 208 | } |
| 209 | ---- |
| 210 | |
| 211 | As response the new parent project name is returned. |
| 212 | |
| 213 | .Response |
| 214 | ---- |
| 215 | HTTP/1.1 200 OK |
| 216 | Content-Disposition: attachment |
| 217 | Content-Type: application/json;charset=UTF-8 |
| 218 | |
| 219 | )]}' |
| 220 | "Public-Plugins" |
| 221 | ---- |
| 222 | |
| Edwin Kempin | c3fe3cb | 2013-02-13 15:09:23 +0100 | [diff] [blame] | 223 | [[dashboard-endpoints]] |
| 224 | Dashboard Endpoints |
| 225 | ------------------- |
| 226 | |
| Edwin Kempin | 7620274 | 2013-02-15 13:51:50 +0100 | [diff] [blame] | 227 | [[list-dashboards]] |
| Edwin Kempin | 7fe2f7f | 2013-02-06 10:12:52 +0100 | [diff] [blame] | 228 | GET /projects/\{project-name\}/dashboards/ (List Dashboards) |
| 229 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 230 | List custom dashboards for a project. |
| 231 | |
| Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 232 | As result a list of link:#dashboard-info[DashboardInfo] entries is |
| 233 | returned. |
| 234 | |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 235 | List all dashboards for the `work/my-project` project: |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 236 | |
| 237 | .Request |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 238 | ---- |
| 239 | GET /projects/work%2Fmy-project/dashboards/ HTTP/1.0 |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 240 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 241 | |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 242 | .Response |
| 243 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 244 | HTTP/1.1 200 OK |
| 245 | Content-Disposition: attachment |
| 246 | Content-Type: application/json;charset=UTF-8 |
| 247 | |
| 248 | )]}' |
| 249 | [ |
| 250 | { |
| 251 | "kind": "gerritcodereview#dashboard", |
| 252 | "id": "main:closed", |
| 253 | "ref": "main", |
| 254 | "path": "closed", |
| 255 | "description": "Merged and abandoned changes in last 7 weeks", |
| 256 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
| 257 | "default": true, |
| 258 | "title": "Closed changes", |
| 259 | "sections": [ |
| 260 | { |
| 261 | "name": "Merged", |
| 262 | "query": "status:merged age:7w" |
| 263 | }, |
| 264 | { |
| 265 | "name": "Abandoned", |
| 266 | "query": "status:abandoned age:7w" |
| 267 | } |
| 268 | ] |
| 269 | } |
| 270 | ] |
| 271 | ---- |
| 272 | |
| Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 273 | .Get all dashboards of the 'All-Projects' project |
| 274 | **** |
| 275 | get::/projects/All-Projects/dashboards/ |
| 276 | **** |
| 277 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 278 | [[get-dashboard]] |
| 279 | GET /projects/\{project-name\}/dashboards/\{dashboard-id\} (Get Dashboard) |
| 280 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 281 | Retrieves a project dashboard. The dashboard can be defined on that |
| 282 | project or be inherited from a parent project. |
| 283 | |
| 284 | .Request |
| 285 | ---- |
| 286 | GET /projects/work%2Fmy-project/dashboards/main:closed HTTP/1.0 |
| 287 | ---- |
| 288 | |
| 289 | As response a link:#dashboard-info[DashboardInfo] entity is returned |
| 290 | that describes the dashboard. |
| 291 | |
| 292 | .Response |
| 293 | ---- |
| 294 | HTTP/1.1 200 OK |
| 295 | Content-Disposition: attachment |
| 296 | Content-Type: application/json;charset=UTF-8 |
| 297 | |
| 298 | )]}' |
| 299 | { |
| 300 | "kind": "gerritcodereview#dashboard", |
| 301 | "id": "main:closed", |
| 302 | "ref": "main", |
| 303 | "path": "closed", |
| 304 | "description": "Merged and abandoned changes in last 7 weeks", |
| 305 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
| 306 | "default": true, |
| 307 | "title": "Closed changes", |
| 308 | "sections": [ |
| 309 | { |
| 310 | "name": "Merged", |
| 311 | "query": "status:merged age:7w" |
| 312 | }, |
| 313 | { |
| 314 | "name": "Abandoned", |
| 315 | "query": "status:abandoned age:7w" |
| 316 | } |
| 317 | ] |
| 318 | } |
| 319 | ---- |
| 320 | |
| 321 | To retrieve the default dashboard of a project use `default` as |
| 322 | dashboard-id. |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 323 | |
| 324 | .Request |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 325 | ---- |
| 326 | GET /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 327 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 328 | |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 329 | .Response |
| 330 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 331 | HTTP/1.1 200 OK |
| 332 | Content-Disposition: attachment |
| 333 | Content-Type: application/json;charset=UTF-8 |
| 334 | |
| 335 | )]}' |
| 336 | { |
| 337 | "kind": "gerritcodereview#dashboard", |
| 338 | "id": "main:closed", |
| 339 | "ref": "main", |
| 340 | "path": "closed", |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 341 | "description": "Merged and abandoned changes in last 7 weeks", |
| 342 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 343 | "default": true, |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 344 | "title": "Closed changes", |
| 345 | "sections": [ |
| 346 | { |
| 347 | "name": "Merged", |
| 348 | "query": "status:merged age:7w" |
| 349 | }, |
| 350 | { |
| 351 | "name": "Abandoned", |
| 352 | "query": "status:abandoned age:7w" |
| 353 | } |
| 354 | ] |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 355 | } |
| 356 | ---- |
| 357 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 358 | [[set-dashboard]] |
| 359 | PUT /projects/\{project-name\}/dashboards/\{dashboard-id\} (Set Dashboard) |
| 360 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 361 | Updates/Creates a project dashboard. |
| 362 | |
| 363 | Currently only supported for the `default` dashboard. |
| 364 | |
| 365 | The creation/update information for the dashboard must be provided in |
| 366 | the request body as a link:#dashboard-input[DashboardInput] entity. |
| 367 | |
| 368 | .Request |
| 369 | ---- |
| 370 | PUT /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
| 371 | Content-Type: application/json;charset=UTF-8 |
| 372 | |
| 373 | { |
| 374 | "id": "main:closed", |
| 375 | "commit_message": "Define the default dashboard" |
| 376 | } |
| 377 | ---- |
| 378 | |
| 379 | As response the new/updated dashboard is returned as a |
| 380 | link:#dashboard-info[DashboardInfo] entity. |
| 381 | |
| 382 | .Response |
| 383 | ---- |
| 384 | HTTP/1.1 200 OK |
| 385 | Content-Disposition: attachment |
| 386 | Content-Type: application/json;charset=UTF-8 |
| 387 | |
| 388 | )]}' |
| 389 | { |
| 390 | "kind": "gerritcodereview#dashboard", |
| 391 | "id": "main:closed", |
| 392 | "ref": "main", |
| 393 | "path": "closed", |
| 394 | "description": "Merged and abandoned changes in last 7 weeks", |
| 395 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
| 396 | "default": true, |
| 397 | "title": "Closed changes", |
| 398 | "sections": [ |
| 399 | { |
| 400 | "name": "Merged", |
| 401 | "query": "status:merged age:7w" |
| 402 | }, |
| 403 | { |
| 404 | "name": "Abandoned", |
| 405 | "query": "status:abandoned age:7w" |
| 406 | } |
| 407 | ] |
| 408 | } |
| 409 | ---- |
| 410 | |
| 411 | [[delete-dashboard]] |
| 412 | DELETE /projects/\{project-name\}/dashboards/\{dashboard-id\} (Delete Dashboard) |
| 413 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 414 | Deletes a project dashboard. |
| 415 | |
| 416 | Currently only supported for the `default` dashboard. |
| 417 | |
| 418 | A message to commit the deletion of the project dashboard can be |
| 419 | specified in the request body inside a link:#dashboard-input[ |
| 420 | DashbaordInput] entity. |
| 421 | |
| 422 | Please note that some proxies prohibit request bodies for DELETE |
| 423 | requests. |
| 424 | |
| 425 | .Request |
| 426 | ---- |
| 427 | DELETE /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
| 428 | ---- |
| 429 | |
| 430 | .Response |
| 431 | ---- |
| 432 | HTTP/1.1 204 No Content |
| 433 | ---- |
| 434 | |
| Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 435 | |
| 436 | [[ids]] |
| 437 | IDs |
| 438 | --- |
| 439 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 440 | \{dashboard-id\} |
| 441 | ~~~~~~~~~~~~~~~~ |
| 442 | The ID of a dashboard in the format '<ref>:<path>'. |
| 443 | |
| 444 | A special dashboard ID is `default` which represents the default |
| 445 | dashboard of a project. |
| 446 | |
| Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 447 | \{project-name\} |
| 448 | ~~~~~~~~~~~~~~~~ |
| 449 | The name of the project. |
| 450 | |
| 451 | |
| Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 452 | [[json-entities]] |
| 453 | JSON Entities |
| 454 | ------------- |
| 455 | |
| Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 456 | [[dashboard-info]] |
| 457 | DashboardInfo |
| 458 | ~~~~~~~~~~~~~ |
| 459 | The `DashboardInfo` entity contains information about a project |
| 460 | dashboard. |
| 461 | |
| 462 | [options="header",width="50%",cols="1,^2,4"] |
| 463 | |=============================== |
| 464 | |Field Name ||Description |
| 465 | |`kind` ||`gerritcodereview#dashboard` |
| 466 | |`id` || |
| 467 | The ID of the dashboard. The ID has the format '<ref>:<path>', |
| 468 | where ref and path are URL encoded. |
| 469 | |`project` || |
| 470 | The name of the project for which this dashboard is returned. |
| 471 | |`defining_project`|| |
| 472 | The name of the project in which this dashboard is defined. |
| 473 | This is different from `project` if the dashboard is inherited from a |
| 474 | parent project. |
| 475 | |`ref` || |
| 476 | The name of the ref in which the dashboard is defined, without the |
| 477 | `refs/meta/dashboards/` prefix, which is common for all dashboard refs. |
| 478 | |`path` || |
| 479 | The path of the file in which the dashboard is defined. |
| 480 | |`description` |optional|The description of the dashboard. |
| 481 | |`foreach` |optional| |
| 482 | Subquery that applies to all sections in the dashboard. + |
| 483 | Tokens such as `${project}` are not resolved. |
| 484 | |`url` || |
| 485 | The URL under which the dashboard can be opened in the Gerrit WebUI. + |
| 486 | The URL is relative to the canonical web URL. + |
| 487 | Tokens in the queries such as `${project}` are resolved. |
| 488 | |`default` |not set if `false`| |
| 489 | Whether this is the default dashboard of the project. |
| 490 | |`title` |optional|The title of the dashboard. |
| 491 | |`sections` || |
| 492 | The list of link:#dashboard-section-info[sections] in the dashboard. |
| 493 | |=============================== |
| 494 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 495 | [[dashboard-input]] |
| 496 | DashboardInput |
| 497 | ~~~~~~~~~~~~~~ |
| 498 | The `DashboardInput` entity contains information to create/update a |
| 499 | project dashboard. |
| 500 | |
| 501 | [options="header",width="50%",cols="1,^2,4"] |
| 502 | |============================= |
| 503 | |Field Name ||Description |
| 504 | |`id` |optional| |
| 505 | ID of a dashboard to which this dashboard should link to. |
| 506 | |`commit_message`|optional| |
| 507 | Message that should be used to commit the change of the dashboard. |
| 508 | |============================= |
| 509 | |
| Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 510 | [[dashboard-section-info]] |
| 511 | DashboardSectionInfo |
| 512 | ~~~~~~~~~~~~~~~~~~~~ |
| 513 | The `DashboardSectionInfo` entity contains information about a section |
| 514 | in a dashboard. |
| 515 | |
| 516 | [options="header",width="50%",cols="1,6"] |
| 517 | |=========================== |
| 518 | |Field Name |Description |
| 519 | |`name` |The title of the section. |
| 520 | |`query` |The query of the section. + |
| 521 | Tokens such as `${project}` are not resolved. |
| 522 | |=========================== |
| 523 | |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 524 | [[project-description-input]] |
| 525 | ProjectDescriptionInput |
| 526 | ~~~~~~~~~~~~~~~~~~~~~~~ |
| 527 | The `ProjectDescriptionInput` entity contains information for setting a |
| 528 | project description. |
| 529 | |
| 530 | [options="header",width="50%",cols="1,^2,4"] |
| 531 | |============================= |
| 532 | |Field Name ||Description |
| 533 | |`description` |optional|The project description. + |
| 534 | The project description will be deleted if not set. |
| 535 | |`commit_message`|optional| |
| 536 | Message that should be used to commit the change of the project |
| 537 | description in the `project.config` file to the `refs/meta/config` |
| 538 | branch. |
| 539 | |============================= |
| 540 | |
| Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 541 | [[project-info]] |
| 542 | ProjectInfo |
| 543 | ~~~~~~~~~~~ |
| 544 | The `ProjectInfo` entity contains information about a project. |
| 545 | |
| 546 | [options="header",width="50%",cols="1,^2,4"] |
| 547 | |=========================== |
| 548 | |Field Name ||Description |
| 549 | |`kind` ||`gerritcodereview#project` |
| 550 | |`id` ||The URL encoded project name. |
| 551 | |`name` | |
| 552 | not set if returned in a map where the project name is used as map key| |
| 553 | The name of the project. |
| 554 | |`parent` |optional, + |
| 555 | not set for the root project| |
| 556 | The name of the parent project. + |
| 557 | `?-<n>` if the parent project is not visible (`<n>` is a number which |
| 558 | is increased for each non-visible project). |
| 559 | |`description` |optional|The description of the project. |
| 560 | |`branches` |optional|Map of branch names to HEAD revisions. |
| 561 | |=========================== |
| 562 | |
| Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 563 | [[project-parent-input]] |
| 564 | ProjectParentInput |
| 565 | ~~~~~~~~~~~~~~~~~~ |
| 566 | The `ProjectParentInput` entity contains information for setting a |
| 567 | project parent. |
| 568 | |
| 569 | [options="header",width="50%",cols="1,^2,4"] |
| 570 | |============================= |
| 571 | |Field Name ||Description |
| 572 | |`parent` ||The name of the parent project. |
| 573 | |`commit_message`|optional| |
| 574 | Message that should be used to commit the change of the project parent |
| 575 | in the `project.config` file to the `refs/meta/config` branch. |
| 576 | |============================= |
| 577 | |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 578 | |
| 579 | GERRIT |
| 580 | ------ |
| 581 | Part of link:index.html[Gerrit Code Review] |